package com.dream.wukong.common.core.util;

import org.apache.commons.beanutils.Converter;

import java.util.Date;

/**
 * @Author: wuyichao
 * @Description:
 * @Date: Created in 10:29 2018/9/18.
 * @Modified:
 */
public class DateConvert implements Converter {

    @Override
    public Object convert(Class arg0, Object arg1) {
        if(arg1 instanceof Date){
            Date curp=(Date)arg1;
            if(curp== null){
                return null;
            }
            return curp;
        }
        return null;
    }
}
